package com.erick.shop.api.bootstrap;

import org.springframework.boot.WebApplicationType;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext;

import com.erick.shop.api.annotation.EnableHelloWorldAnnotation;

/**
 * 
 * @author 12057
 *
 */
@EnableHelloWorldAnnotation
public class EnableHelloWordBootstrap {

	public static void main(String[] args) {
		ConfigurableApplicationContext context = new SpringApplicationBuilder(EnableHelloWordBootstrap.class)
				.web(WebApplicationType.NONE)
				.run(args);
		
		String helloWorld = (String)context.getBean("helloWorld",String.class);
		System.out.println(helloWorld);
		
		
		context.close();
	}

}
